home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3236 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.9 KB

  1. Path: rain.fr!world-net!usenet
  2. From: Frederic LACHASSE <lachass@worldnet.fr>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: ***Please Help***  getch() and cin
  5. Date: Mon, 22 Jan 1996 21:55:32 +0000
  6. Organization: World-Net information exchange, Internet provider.
  7. Message-ID: <VA.0000000f.002f4f8e@fred>
  8. References: <4dr79f$3e7@news.cencom.net>
  9. Reply-To: lachass@worldnet.fr
  10. NNTP-Posting-Host: client122.sct.fr
  11. X-Newsreader: Virtual Access by Ashmount Research Ltd, http://www.ashmount.com
  12.  
  13. wsenn@cencom.net (Will Senn) wrote:
  14. >         I would appreciate it if someone could tell me if there is a
  15. > way to make cin read input without line buffering (waiting for the
  16. > carriage return)?  I know all about getch() in conio.h, however I
  17. > would prefer sticking to stream input included in iostream.h.  Any
  18. > help along these lines would be greatly appreciated.
  19. >
  20. >         Before anyone freaks, I spent several hours with the various
  21. > search engines on the web as well as looking through a ton of related
  22. > newsgroups before I posted this seemingly obvious question.  The
  23. > closest I came to an answer was a reference to a FAQ 309, a
  24. > depressingly hard to find faq, quoted in the C++ Faq. Not only that 
  25. > but this is the second time I've posted this note!
  26.  
  27. The bad news is: functions in conio.h are non-standard, and the standard 
  28. iostream.h did not have this functionality. More over, such functions 
  29. are OS dependent and often done quite differently from one system to the 
  30. other, when it is possible (I don't think it's possible with 3270 
  31. terminals for example).
  32.  
  33. So I'm afraid you're stuck with the non-standard stuff and you'll better 
  34. tell which system you use with which compiler (and perhaps post in a 
  35. more pertinent newsgroup as well). For example: for MS-DOS and Win32 
  36. console program (Windows 95 and NT) and the Borland C++ compiler, you 
  37. can use the constream.h stuff.
  38.  
  39. I nevertheless hope this'll help.
  40.  
  41.  Frederic LACHASSE (ECP 86)
  42.  CompuServe: 100530,2005
  43.  Internet: lachass@worldnet.fr
  44.  
  45.